CREATE TRIGGER ADDRESSES_TRG 
BEFORE INSERT ON ADDRESSES 
FOR EACH ROW 
BEGIN
  <<COLUMN_SEQUENCES>>
  BEGIN
    IF :NEW.ADDRESS_ID IS NULL THEN
      SELECT ADDRESSES_SEQ.NEXTVAL INTO :NEW.ADDRESS_ID FROM DUAL;
    END IF;
  END COLUMN_SEQUENCES;
END;
/
